<!--Copyright (C) Kherty.  All rights reserved.-->
<ResourceDictionary
    x:Class="OpenLS.Chart.UI.MarkerResources"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:chart="http://schemas.Kherty.com/office/2007/chart"
    xmlns:chartui="clr-namespace:OpenLS.Chart.UI"
    xmlns:drawing="http://schemas.Kherty.com/office/2007/drawing"
    xmlns:drawing2="clr-namespace:OpenLS.Drawing.UI;assembly=OpenLS.Drawing.UI"
    xmlns:Internals="clr-namespace:OpenLS.Chart.UI.Internals"
    >
    
    <DataTemplate  DataType="{x:Type chart:NumericValue}" x:Key="NumericMarkerTemplate">
        <Path Style="{x:Static chartui:ShapedObjectResources.ShapedElementStyle}" Name="path"
                StrokeThickness ="{Binding RelativeSource={RelativeSource Self}, Path=(drawing2:DrawingElement.ShapeProperties).LineProperties.Width, FallbackValue=1}"
              Width="{Binding RelativeSource={RelativeSource Self}, Path=(chartui:SeriesElement.Marker).Size}"
              Height="{Binding RelativeSource={RelativeSource Self}, Path=(chartui:SeriesElement.Marker).Size}">
            <Path.Data>
                <MultiBinding Converter="{x:Static Internals:ChartConverters.MarkerStyleSizeToPathDataConverter}">
                    <Binding RelativeSource="{RelativeSource Self}" Path="(chartui:SeriesElement.Marker).Symbol"/>
                    <Binding RelativeSource="{RelativeSource Self}" Path="(chartui:SeriesElement.Marker).Size"/>
                    <Binding RelativeSource="{RelativeSource Self}" Path="(chartui:SeriesElement.Series).Index"/>
                </MultiBinding>
            </Path.Data>

            <Path.ContextMenu>
                <ContextMenu>
                    <MenuItem Command="{x:Static chartui:ChartCommands.UnformatDataSeries}"/>
                    <MenuItem Command="{x:Static chartui:ChartCommands.AddTitle}" />
                    <MenuItem Command="{x:Static chartui:ChartCommands.AddLegend}" />
                    <MenuItem Command="{x:Static chartui:ChartCommands.AddDataLabels}" />
                    <MenuItem Command="{x:Static chartui:ChartCommands.FormatDataLabels}" />
                    <MenuItem Command="{x:Static chartui:ChartCommands.FormatDataSeries}" />
                    <MenuItem Command="{x:Static chartui:ChartCommands.FormatDataPoint}"/>
                    <MenuItem Command="{x:Static chartui:ChartCommands.UnformatDataPoint}"/>
                </ContextMenu>
            </Path.ContextMenu>
        </Path>
        <DataTemplate.Triggers>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=(drawing:DrawingElement.ShapeProperties).FillProperties, FallbackValue={x:Null}}" Value="{x:Null}">
                <Setter TargetName="path" Property="Fill">
                    <Setter.Value>
                            <MultiBinding Converter="{x:Static Internals:ChartConverters.PatternConverter}">
                                <Binding RelativeSource="{RelativeSource Self}" Path="(chartui:ChartElement.Style)"/>
                                <Binding RelativeSource="{RelativeSource Self}" Path="(chartui:SeriesElement.Series).Index"/>
                                <Binding RelativeSource="{RelativeSource Self}" Path="(drawing:DrawingElement.Theme).ColorScheme"/>
                                <Binding Source="debug4"/>
                            </MultiBinding>
                    </Setter.Value>
                </Setter>
            </DataTrigger>
            </DataTemplate.Triggers>
      
    </DataTemplate>
    
</ResourceDictionary>